import { getBannerApi } from "@/api/home";
import { onMounted, ref } from "vue";

export const useBanner = () => {
  const bannerList = ref([]);
  const getBanner = async () => {
    const res = await getBannerApi("2");
    bannerList.value = res.result;
  };
  onMounted(() => {
    getBanner();
  });
  return { bannerList };
};
